package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t = new Thread(){
            public void run(){
                String name = this.getName();
                System.out.println(name);

                long id = this.getId();
                System.out.println(id);

                int priority = this.getPriority();
                System.out.println(priority);

                boolean interrupted = this.isInterrupted();
                boolean daemon = this.isDaemon();
                boolean alive = this.isAlive();
                System.out.println("是否被中断:"+interrupted);
                System.out.println("是否是守护线程:"+daemon);
                System.out.println("是否还活着:"+alive);
            }
        };
        t.start();
    }
}
